package com.web.base.wechat.message;

import java.io.Serializable;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;

import javax.validation.constraints.NotBlank;

import com.blue.core.dict.State;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

public class WechatTemplateRequest implements Serializable
{
	private static final long serialVersionUID = 1L;

	@NotNull(groups = { UpdateModel.class }, message = "微信消息模板ID不能为空")
	@Null(groups = { SaveModel.class }, message = "微信消息模板ID必须为空")
	private Integer id;
	@NotNull(groups = { SaveModel.class }, message = "微信公众号ID不能为空")
	private Integer wechatId;
	@NotBlank(groups = { SaveModel.class, UpdateModel.class }, message = "微信消息模板代码不能为空")
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "微信消息模板代码长度[0-50]")
	private String code;
	@NotBlank(groups = { SaveModel.class }, message = "微信消息模板编号不能为空")
	@Size(min = 0, max = 100, groups = { SaveModel.class, UpdateModel.class }, message = "微信消息模板编号长度[0-100]")
	private String tplId;
	@NotBlank(groups = { SaveModel.class }, message = "微信消息模板名称不能为空")
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "微信消息模板名称长度[0-50]")
	private String name;
	@NotBlank(groups = { SaveModel.class }, message = "微信消息模板内容不能为空")
	@Size(min = 0, max = 500, groups = { SaveModel.class, UpdateModel.class }, message = "微信消息模板内容长度[0-500]")
	private String content;
	private State state;

	public WechatTemplateRequest()
	{
	}

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public Integer getWechatId()
	{
		return wechatId;
	}

	public void setWechatId(Integer wechatId)
	{
		this.wechatId = wechatId;
	}

	public String getCode()
	{
		return code;
	}

	public void setCode(String code)
	{
		this.code = code;
	}

	public String getTplId()
	{
		return tplId;
	}

	public void setTplId(String tplId)
	{
		this.tplId = tplId;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public State getState()
	{
		return state;
	}

	public void setState(State state)
	{
		this.state = state;
	}

}
